package ssm.common;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Hello implements Job{

    private static Logger log = LoggerFactory.getLogger(Hello.class);
    SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");



    public void execute(JobExecutionContext context) throws JobExecutionException {
        System.out.println("执行"+sf.format(new Date()));
        log.info("开始执行!!!!!!!!!!");
        try {
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("休眠完成"+sf.format(new Date()));
    }

}
